package com.gofun.framework.core;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import com.gofun.framework.core.property.CustomBigDecimalEditor;
import com.gofun.framework.core.property.CustomDateEditor;



/**
 * @Project       : spring-boot-sample
 * @Program Name  : com.ljt.springboot.common.BaseController.java
 * @Description   : Controller基类
 * @Author        : wangchao
 * @Creation Date : 2016-3-8 上午11:41:34 
 * @ModificationHistory  
 * Who          When             What 
 * ----------   -------------    -----------------------------------
 * wangchao     2016-3-8        create
 */
public class BaseController {
	
	protected final Logger logger = LoggerFactory.getLogger(getClass());
	
	@InitBinder
	protected void initBinder(WebDataBinder binder) {
		binder.registerCustomEditor(java.util.Date.class, new CustomDateEditor());
		binder.registerCustomEditor(java.math.BigDecimal.class, new CustomBigDecimalEditor());
	}

}
